#!/usr/bin/env python3
# -*- coding: utf-8 -*-
##############################################
# @Author: DengLibin 榆霖
# @Date: Create in 2022-03-07 16:29:31
# @Description: 豆瓣
##############################################
'module name'
__author__ = 'DengLibin'

import requests


def run():
    # 设置请求头
    headers_dic = {
        "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.51 Safari/537.36"
    }
    url = 'https://movie.douban.com/j/search_subjects?'
    # 封装参数
    param = {
        "ype": "movie",
        "tag": "华语",
        "page_limit": 50,
        "page_start": 0,
    }
    resp = requests.get(url = url, params = param, headers = headers_dic)
    print(resp.request.url)
    print("--------------------------------------------------")
    print(resp.json())
    resp.close()

if __name__ == '__main__':
    run()
